<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="favicon.ico" />
<link href="user/css/UserCenter.css?v=<?=WEB_VERSION?>" rel="stylesheet" type="text/css" />
<script src="user/js/jquery-1.7.1.min.js?v=<?=WEB_VERSION?>" type="text/javascript" language="javascript"></script>
<script src="user/js/UserWin.min.js?v=<?=WEB_VERSION?>" type="text/javascript" language="javascript"></script>
<script type="text/javascript" src="user/js/home.min.js?v=<?=WEB_VERSION?>"></script>
<script src="user/js/jquery.datePicker-min.js?v=<?=WEB_VERSION?>" type="text/javascript"></script>
<title>100课堂英语学习会员中心</title>
</head>
<script>
function download_file(url){
	window.location.href=url
	window.location.target="_blank";
}
</script>
<body>
<?include('userTop.php')?>
<div class="CenterAuto">
	<?
    include('userLeft.php')
    ?>
        <div class="CenterRight">
        <?
		if ($userData['user_experience_class']>0){
        ?>
		<div class="Surprise">
    	<img src="user/images/use2.jpg" width="89" height="39" />您现在可以免费预约外教一对一口语测试课，外教任选哦！<a href="<?=SITE_URL?>user_teacherList.htm">立即预约</a>
    	</div>    	
    	<?
		}
		?>
	<ul class="PublicTwoR">
    	<li class="hovs">您的账户概览</li>
    </ul>
    <?
	if ($userData['user_experience_class']>0){
    ?>
    <p style="height:36px; padding:0 20px; line-height:36px; font-size:14px; color:#666;">您目前剩余免费体验课：<em style="color:#C00; font-weight:bold;">1</em>节课</p>
    <?
	}
	?>    
    <p style="height:36px; padding:0 20px; line-height:36px; font-size:14px; color:#666;">您已经完成：<em style="color:#C00; font-weight:bold;"><?=$userCourseCount?></em>节课</p>
    <p style="height:36px; padding:0 20px; line-height:36px; font-size:14px; color:#666;">我们提供次卡和包月两种价格方案。您目前剩余：</p>
	<ul class="Kapian">
    	<li>余额</li>
        <li><em style="color:#c00; font-weight:bold; font-size:16px;"><?=$userData['user_moeny']?>&nbsp;元</em></li>
    </ul>
	<ul class="Kapian">
    	<li>次卡</li>
	     <?
			if ($userData['user_class']>0){
	     ?>
        <li><em style="color:#c00; font-weight:bold; font-size:16px;"><?=$userData['user_class']?>次&nbsp;&nbsp;有效期至<?=date('Y年m月d日',$userData['class_period_validity'])?></em></li>
        <?}else{?>
        <li>立即购买次卡套餐方案,自由上课,快乐无忧！<a href="user_productList.htm">购买次卡</a></li>
        <?}?>
    </ul>
    <ul class="Kapian">
    	<li>包月</li>
    	<?
		if ($userData['user_monthly_class']>0){
        ?>
       	 <li><em style="color:#c00; font-weight:bold; font-size:16px;">有效期至<?=date('Y年m月d日',$userData['monthly_class_period_validity'])?>,包月可每天上一节课，坚持练习效果显著！</em></li>
        <?
		}else{
		?>
        <li>立即购买包月特惠方案，包月可每天上一节课，坚持练习效果显著！<a href="user_productList.htm">购买包月</a></li>
        <?}?>
    </ul>
    
    <div class="LikeBoot">
    <a href="user_teacherList.htm">预约课程</a>
    <a href="user_productList.htm">购买课程</a>
    <a href="user_invitation.htm">邀请好友</a></div>
    
    <div class="PublicUserListTitle"><em>我的已预约课程</em>(注释：如若取消课程，请提前1小时联系我们，谢谢！)</div>
    <table width="770" border="0" cellspacing="2">
      <tr>
        <td height="30" align="center" valign="middle" bgcolor="#0D6DB7" class="ColorFFF">时间</td>
        <td height="30" align="center" valign="middle" bgcolor="#0D6DB7" class="ColorFFF">卡类型</td>
        <td height="30" align="center" valign="middle" bgcolor="#0D6DB7" class="ColorFFF">已约外教</td>
        <td height="30" align="center" valign="middle" bgcolor="#0D6DB7" class="ColorFFF">课程教材</td>
        <td height="30" align="center" valign="middle" bgcolor="#0D6DB7" class="ColorFFF">操作</td>
      </tr>
      <?
		 foreach($userBook as $v){
	  ?>
      <tr>
        <td height="160" align="center" valign="middle" bgcolor="#E7E7E7"><p><?=date('Y-m-d',$v['book_date'])?></p><p><?=$v['book_time_name']?></p></td>
        <td height="160" align="center" valign="middle" bgcolor="#E7E7E7"><?=$v['book_type']?></td>
        <td height="160" align="center" valign="middle" bgcolor="#E7E7E7">
        	<p>
        	<br>
        	<a href="<?=SITE_URL?>teacher/info_<?=$v['teacher_id']?>.htm"><img src="<?=SITE_URL.$v['teacher_portrait']?>" width="80" height="105" /></a></p>
            <p><a href="#"><?=$v['teacher']?></a></p>
            <p>QQ:<?=$v['teacher_qq']?></p>
            <p>Skype:<?=$v['teacher_skype']?></p>
        </td>
        <td height="160" align="center" valign="middle" bgcolor="#E7E7E7">
        	<p id="li_course_<?=$v['id']?>"><?=$v['course'].'-'.$v['chapter_name']?></p>
            <p>&nbsp;</p>
            
              <?if($v['course_type']!=COURSE_TYPE_18){?>
            <p><a class="PublicButtonStyle" href="javaScript:void(0);"  onClick="javaScript:download_file('<?=$v['download_url']?>')">下载教材</a>
            	<?}?>
              <?if($v['class_status']==CLASS_STATUS_0){?>
              	<a class="PublicButtonStyle" href="javaScript:void(0);"  name="edit_teaching_material" id2="<?=$v['id']?>" >修改教材</a>
              <?}?>
            </p>
        </td>
        <td height="160" align="center" valign="middle" bgcolor="#E7E7E7">
            <p>
		     	<?if($v['cancellation']!=5){?>
    			   <a href="user_cancellation.htm?id=<?=$v['id']?>">
			        		取消预约
			       </a>
		        <?}{if($v['class_status']!=CLASS_STATUS_2){?>
		            <?$today = strtotime(date('Y-m-d'));
		              $now_time=date('H').date('i');
		            	if($today<$v['book_date']){?>
       						<a href="user_cancellation.htm?id=<?=$v['id']?>">
			        		取消预约
			        		</a>
		        	<?}?>
		            <?if($today==$v['book_date']){?>
		            		<?if($now_time+100<=$v['book_time']){?>
			        		<a href="user_cancellation.htm?id=<?=$v['id']?>">
			        		取消预约
			        		</a>
		        	      <?}elseif($now_time<$v['book_time']&&$now_time+100>$v['book_time']){?>
		        			准备上课
		        		  <?}elseif($now_time>$v['book_time']+30){?>
		        			未上课
		        		  <?}elseif($now_time>=$v['book_time']&&$now_time<=$v['book_time']+30){?>
		        			课堂时间
		        		  <?}?>
		        	<?}?>
		        <?}else{?>
		        	已完成上课
		        <?}}?>            
            </p>
        </td>
      </tr>
      <?
		}
	  ?>
    </table>

    <div class="PublicUserListTitle mt10"><em>我的最近一次学习记录</em>(注释：外教老师写给你的课后评价都可以点击查看档案按钮查看档案哦！)</div>
    
    <table width="770" border="0" cellspacing="2">
      <tr>
        <td height="30" align="center" valign="middle" bgcolor="#0D6DB7" class="ColorFFF">时间</td>
        <td height="30" align="center" valign="middle" bgcolor="#0D6DB7" class="ColorFFF">卡类型</td>
        <td height="30" align="center" valign="middle" bgcolor="#0D6DB7" class="ColorFFF">已约外教</td>
        <td height="30" align="center" valign="middle" bgcolor="#0D6DB7" class="ColorFFF">课程教材</td>
        <td height="30" align="center" valign="middle" bgcolor="#0D6DB7" class="ColorFFF">操作</td>
      </tr>
     <?
      foreach ($haveClassRecord as $v){
	 ?>
      <tr>
        <td height="160" align="center" valign="middle" bgcolor="#E7E7E7"><p><?=date('Y-m-d',$v['book_date'])?></p><p><?=$v['book_time']?></p></td>
        <td height="160" align="center" valign="middle" bgcolor="#E7E7E7"><?=$v['book_type']?></td>
        <td height="160" align="center" valign="middle" bgcolor="#E7E7E7">
        	<p>
        	&nbsp;
        	<br>
        	<a href="<?=SITE_URL?>teacher/info_<?=$v['teacher_id']?>.htm"><img src="<?=SITE_URL.$v['teacher_portrait']?>" width="80" height="105" /></a></p>
            <p><a href="<?=SITE_URL?>teacher/info_<?=$v['teacher_id']?>.htm"><?=$v['teacher']?></a></p>
            <p>QQ:<?=$v['teacher_qq']?></p>
            <p>Skype:<?=$v['teacher_skype']?></p>
        </td>
        <td height="160" align="center" valign="middle" bgcolor="#E7E7E7">
        	<p><input type="button" class="PublicButtonStyle2" value="查看档案"  id="<?=$v['id']?>" /></p>
        	<?if($v['course_type']!=COURSE_TYPE_18){?>
            <p><a class="PublicButtonStyle"  onClick="location.href='<?=$v['download_url']?>'">下载教材</a></p>
            <?}?>
        </td>
        <td height="160" align="center" valign="middle" bgcolor="#E7E7E7">
        	<div date="<?=$v['id']?>" class="EWjlutqq" style="padding:10px 0 10px; cursor:pointer;">
	          <?
			  $i=  0;
	          while  ($i<5){
			  	if ($v['satisfaction']>$i){
					echo '<img src="user/images/icoxin.png" width="19" height="17" />';
				}
				else{
					echo ' <img src="user/images/icoxin1.png" width="19" height="17" />';
				}
				$i++;
			  }
			  ?>
            </div>
            <p><a href="javaScript:void(0);"  class="TOUsu" date="<?=$v['id']?>" >课程投诉</a></p>
        </td>
      </tr>
     	 <?
		  }
		?>      
    </table>
  </div>
  <div class="clearc"></div>
</div>
<div id="DreatQyue" style="display:none;"> 
	<div class="RtChsk">总体评价<a id="ClosDreatQyue" class="closedTcun" href="javascript:;"></a></div>
    <form action="user_evaluation.htm" method="post" name="POrtw">
    <p><strong>满意度：</strong>
    	<span style="padding-top:8px;">
        <i class="Hxindd aixin" date="1"></i>
        <i class="Hxindd aixin" date="2"></i>
        <i class="Hxindd aixin" date="3"></i>
        <i class="Hxindd2 aixin" date="4"></i>
        <i class="Hxindd2 aixin" date="5"></i>
        <input type="hidden" id="XingXingValue" name="satisfaction" value="" />
        </span>
     </p>
     <p><strong>通话效果：</strong>
       <input type="radio" value="5" name="call" />很好
       <input type="radio" value="4" name="call" />好
       <input type="radio" value="3" name="call" />一般
       <input type="radio" value="2" name="call" />差
       <input type="radio" value="1" name="call" />很差
     </p>
     <p><strong>老师的发音：</strong>
     	<input type="radio" value="5" name="pronuncia" />很好
       <input type="radio" value="4" name="pronuncia" />好
       <input type="radio" value="3" name="pronuncia" />一般
       <input type="radio" value="2" name="pronuncia" />差
       <input type="radio" value="1" name="pronuncia" />很差
     </p>
     <p><strong>教学方法：</strong>
     	<input type="radio" value="5" name="method" />很好
       <input type="radio" value="4" name="method" />好
       <input type="radio" value="3" name="method" />一般
       <input type="radio" value="2" name="method" />差
       <input type="radio" value="1" name="method" />很差
     </p>
     <p><strong>评价：</strong>
     	<textarea id="OpinionList4" name="evaluation"></textarea>
     </p>
     <input type="hidden" id="TeachIdsde" value="" name="book_course_id" />
     <p style="margin-top:40px;"><input class="TiPingjia" type="submit" value="提交评价" /></p>
     </form>
</div>
<div id="DangAnRT" style="display:none;">
<a id="ClosDangAnRT" class="closedTcun" href="javascript:;"></a>
<div class="RtChsk">
课程档案</div>
<div class="teachRecord">
	<p id="p1"><strong>教学内容：</strong>
	</p>
	<p cols="80" rows="3"  id="c_1" style="word-break:break-all; width:450px; overflow:auto;">
	</p>
	<p id="p2"><strong>课堂表现：</strong>
	</p>
	<p cols="80" rows="3"    id="c_2" style="word-break:break-all; width:450px; overflow:auto;">
	</p>
	<p id="p3"><strong>语法结构：</strong>
	</p>
	<p cols="80" rows="3"    id="c_3" style="word-break:break-all; width:450px; overflow:auto;">
	</p>
	<p id="p4"><strong>词汇结构：</strong>
	</p>
	<p cols="80" rows="3"   id="c_4" style="word-break:break-all; width:450px; overflow:auto;">
	</p>
	<p id="p5"><strong>发音：</strong>
	</p>
	<p cols="80" rows="3"   id="c_5" style="word-break:break-all; width:450px; overflow:auto;">
	</p>
	<p id="p6"><strong>教师留言：</strong>
	</p>
	<p cols="80" rows="3"    id="c_6" style="word-break:break-all; width:450px; overflow:auto;">
	</p>
</div>
</div>
<div id="DreatQytsey" style="display:none;">
	<div class="RtChsk">投诉<a id="ClosDreatQytsey" class="closedTcun" href="javascript:;"></a></div>
    <form action="user_complaint.htm" method="post" name="POrtw212">
    <p><strong>投诉类别：</strong>
		<select name="type">
        <?
        foreach ($complaint_type as $k=>$v){
		?>
        	<option value="<?=$k?>"><?=$v?></option>
      <?
		}
	  ?>
       </select>
     </p>
     <p><strong>投诉内容：</strong>
     	<textarea id="OpinionList4" name="content"></textarea>
     </p>
     <ul><input type="submit" value="确认提交" /><input style="background:#A5C94B;" type="reset" value="清空内容" /></ul>
     <p style="text-align:center; margin-top:20px;">您的每一点宝贵意见都能更好的帮助我们改进服务！谢谢！</p>
     <input type="hidden" id="Touxss"  name="book_course_id" value="" />
     </form>
</div>
<div id="floatDivCover" style="display:none;"></div>
<script>
$("a[name='edit_teaching_material']").click(function(){
	var id=$(this).attr("id2");
	var s = window.showModalDialog("user_updateBooking.htm?id="+id,window,"dialogWidth=650px;dialogHeight=600px");
	if(s.length>0){
		$("#li_course_"+id).html(s);
	}
})					
</script>	
<?include('userFoot.php')?>	 
</body>
</html>
